nv.CreateNamespace("nv.util");
nv.util.OOP = {
    extend: function (object, parent) {
        if (typeof object == "object" && object.constructor != Object && typeof parent == "function") {
            parent.apply(object, Array.prototype.slice.call(arguments, 2));
            var base = {};
            for (var i in object) {
                if (object.hasOwnProperty(i)) {
                    if (typeof object[i] == "function") {
                        base[i] = object[i];
                    }
                }
            }
            return base;
        } else {
            nv.error("Invalid args given to nv.util.OOP.extend");
            return {};
        }
    },
    typeOf: function (object, constructor) {
        return typeof (object) === 'object' && object.constructor === constructor;
    },
    abstract: function (func) {
        return function () {
            var funcName = "(anonymous)";
            if (typeof (func) === "string") {
                funcName = func;
            }
            nv.error(funcName + " is an abstract function and needs to be overriden");
        };
    }
};